xenpaging: unify error handling
authorOlaf Hering <olaf@aepfle.de>
Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)
committerOlaf Hering <olaf@aepfle.de>
Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)
commit45d78d49f2ffce2d7ec0a887807eb012a078bc61
tree04150a233c229f96d135ad28c0186252dfe4e311
parent03be4100fb3cbbad1c0d1704b0b8dd81f63f63fb
xenpaging: unify error handling

Update functions to return -1 on error, 0 on success.
Simplify init_page() and make sure errno is assigned.
Adjust PERROR/ERROR usage, use PERROR early because it overwrites errno.
Adjust xenpaging_populate_page() to handle gfn as unsigned long.

Update xenpaging exit code handling. xenpaging_teardown cant possible
fail. Adjust mainloop to indicate possible errors to final exit.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/xenpaging/xenpaging.c